package com.kob.backend.controller.product;

import com.kob.backend.pojo.product;
import com.kob.backend.service.product.ProductSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class ProductSearchController {
    @Autowired
    private ProductSearchService productSearchService;
    @GetMapping("/product/search")
    public List<product> searchproduct(@RequestParam Map<String,String> map)
    {
        String search_content=map.get("search_content");
        return productSearchService.searchproduct(search_content);
    }
}
